package com.cjm.one.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cjm.one.model.base.PasswordDto;
import com.cjm.one.model.system.dto.SysUserInfoDto;
import com.cjm.one.model.system.dto.SysUserInfoFromDto;
import com.cjm.one.model.system.entity.SysUserInfo;
import com.cjm.one.model.system.entity.SysUserRole;
import com.cjm.one.model.system.vo.SysUserInfoVo;

import java.util.List;

/**
* @author 29289
* @description 针对表【sys_user_info(用户表)】的数据库操作Service
* @createDate 2024-09-05 16:21:14
*/
public interface SysUserInfoService extends IService<SysUserInfo> {
    //根据用户名获取用户信息
    SysUserInfo getByUserName(String username);
    //新增系统用户
    boolean saveUser(SysUserInfo sysUserInfo);

    SysUserInfo getSysUserById(Long id);


    boolean updatSysUsereById(SysUserInfoDto sysUserInfoDto);
    //删除用户
    boolean deleteSysUser(Long id);
    //修改用户密码
    boolean updateSysUserePasswordById(PasswordDto passwordDto);

    boolean updateSysUsereStatusById(SysUserInfoDto sysUserInfoDto);
    //根据id获取用户角色list

    List<SysUserRole> getSysUserRoleList(Long userId);

    Page<SysUserInfoVo> getSysUserPage(Page<SysUserInfoVo> page, SysUserInfoFromDto queryVo);
    //批量删除用户
    Integer deleteSysUsereMore(List<Long> ids);

    Boolean resetPassword(PasswordDto passwordDto);
}
